﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WoWAPI
{
	public class Reward
	{
		private const string REWARD_URL = "http://{0}.battle.net/api/wow/data/guild/rewards";

		public int MinGuildLevel { get; set; }
		public int MinGuildRepLevel { get; set; }
		public int[] Races { get; set; }
		public Achievement Achievement { get; set; }
		public Item Item { get; set; }

		public Reward() { }

		public static Reward[] GetRewards(string Region)
		{
			return API.DeserializeJSON<RewardCollection>(API.MakeWebRequest(String.Format(REWARD_URL, Region))).Rewards;
		}

		private class RewardCollection
		{
			public Reward[] Rewards { get; set; }

			public RewardCollection() { }
		}
	}
}
